#ifndef __H_MY_DEF_H__
#define __H_MY_DEF_H__

#include "cmd.h"
#include "Packet.h"
#include "globalDefine.h"

struct stRecordItem
{
	std::string m_roundid;
	int64 m_bet;
	int m_betact;
	int64 m_win;
	int m_winact;
	_u64_ m_timestamp;
	std::string m_detail;
	int64 m_daybetamount;
	int64 m_daywinamount;
	int m_firstofdayflag;  
	unsigned int m_userseq;
	_u64_ m_lastdetailcachetime;
	std::string m_ext;

	stRecordItem():m_bet(0), m_betact(0), m_win(0), m_winact(0), m_timestamp(0), m_daybetamount(0), m_daywinamount(0), m_firstofdayflag(0), m_userseq(0), m_lastdetailcachetime(0)
	{
	}
	stRecordItem(const std::string& roundid, const int64 bet, const int betact, const int64 win, const int winact, const _u64_ tt, const std::string& detail
	, const int64 daybetamount, const int64 daywinamount, const int firstofdayflag, const unsigned int userseq, const _u64_ lastdetailcachetime, const std::string& ext)
	{
	    m_roundid = roundid;
	    m_bet = bet;
	    m_betact = betact;
	    m_win = win;
	    m_winact = winact;
	    m_timestamp = tt;
	    m_detail = detail;
	    m_daybetamount = daybetamount;
	    m_daywinamount = daywinamount;
	    m_firstofdayflag = firstofdayflag;  
	    m_userseq = userseq;
		m_lastdetailcachetime = lastdetailcachetime;
		m_ext = ext;
	}
	stRecordItem(std::string&& roundid, const int64 bet, const int betact, const int64 win, const int winact, const _u64_ tt, std::string&& detail
	, const int64 daybetamount, const int64 daywinamount, const int firstofdayflag, const unsigned int userseq, const _u64_ lastdetailcachetime, std::string&& ext)
	{
	    m_roundid = std::move(roundid);
	    m_bet = bet;
	    m_betact = betact;
	    m_win = win;
	    m_winact = winact;
	    m_timestamp = tt;
	    m_detail = std::move(detail);
	    m_daybetamount = daybetamount;
	    m_daywinamount = daywinamount;
	    m_firstofdayflag = firstofdayflag;  
	    m_userseq = userseq;
		m_lastdetailcachetime = lastdetailcachetime;
		m_ext = std::move(ext);
	}
	stRecordItem(const stRecordItem& other)
	{
	    m_roundid = other.m_roundid;
	    m_bet = other.m_bet;
	    m_betact = other.m_betact;
	    m_win = other.m_win;
	    m_winact = other.m_winact;
	    m_timestamp = other.m_timestamp;
	    m_detail = other.m_detail;
	    m_daybetamount = other.m_daybetamount;
	    m_daywinamount = other.m_daywinamount;
	    m_firstofdayflag = other.m_firstofdayflag;  
	    m_userseq = other.m_userseq;
		m_lastdetailcachetime = other.m_lastdetailcachetime;
		m_ext = other.m_ext;
	}

	stRecordItem& operator = (const stRecordItem& other)
	{
		if (&other == this)
			return *this;

	    m_roundid = other.m_roundid;
	    m_bet = other.m_bet;
	    m_betact = other.m_betact;
	    m_win = other.m_win;
	    m_winact = other.m_winact;
	    m_timestamp = other.m_timestamp;
	    m_detail = other.m_detail;
	    m_daybetamount = other.m_daybetamount;
	    m_daywinamount = other.m_daywinamount;
	    m_firstofdayflag = other.m_firstofdayflag;  
	    m_userseq = other.m_userseq;
		m_lastdetailcachetime = other.m_lastdetailcachetime;
		m_ext = other.m_ext;

		return *this;
	}

	stRecordItem(stRecordItem&& other)
	{
	    m_roundid = std::move(other.m_roundid);
	    m_bet = other.m_bet;
	    m_betact = other.m_betact;
	    m_win = other.m_win;
	    m_winact = other.m_winact;
	    m_timestamp = other.m_timestamp;
	    m_detail = std::move(other.m_detail);
	    m_daybetamount = other.m_daybetamount;
	    m_daywinamount = other.m_daywinamount;
	    m_firstofdayflag = other.m_firstofdayflag;  
	    m_userseq = other.m_userseq;
		m_lastdetailcachetime = other.m_lastdetailcachetime;
		m_ext = std::move(other.m_ext);
	}

	stRecordItem& operator = (stRecordItem&& other)
	{
		if (&other == this)
			return *this;

	    m_roundid = std::move(other.m_roundid);
	    m_bet = other.m_bet;
	    m_betact = other.m_betact;
	    m_win = other.m_win;
	    m_winact = other.m_winact;
	    m_timestamp = other.m_timestamp;
	    m_detail = std::move(other.m_detail);
	    m_daybetamount = other.m_daybetamount;
	    m_daywinamount = other.m_daywinamount;
	    m_firstofdayflag = other.m_firstofdayflag;  
	    m_userseq = other.m_userseq;
		m_lastdetailcachetime = other.m_lastdetailcachetime;
		m_ext = std::move(other.m_ext);

		return *this;
	}
};

struct stRecordDayInfo
{
	int64 m_daybetamount;
	int64 m_daywinamount;
	unsigned int m_userseq;

	stRecordDayInfo() :m_daybetamount(0), m_daywinamount(0), m_userseq(0)
	{
	}

	stRecordDayInfo(const int64 daybetamount, const int64 daywinamount, const unsigned int userseq) :m_daybetamount(daybetamount), m_daywinamount(daywinamount), m_userseq(userseq)
	{
	}
};

#endif